<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class Utility</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class Utility</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Utility functions</p>
	<ul class="tags">
				<li><span class="field">version:</span> $Revision: $</li>
				<li><span class="field">author:</span> Nimish Pachapurkar &lt;<a href="mailto:npac@spikesource.com">npac@spikesource.com</a>&gt;</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_util_Utility_php.html">/util/Utility.php</a> (line <span class="field">28</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>



	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
								<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$logger" title="details" class="var-name">$logger</a>
				</div>
							</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
								
				<div class="method-definition">
											<span class="method-result">String</span>
										<a href="#capitalizeDriveLetter" title="details" class="method-name">capitalizeDriveLetter</a>
											(<span class="var-type">$path</span>&nbsp;<span class="var-name">$path</span>)
									</div>
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#getLogger" title="details" class="method-name">getLogger</a>
											([<span class="var-type">mixed</span>&nbsp;<span class="var-name">$package</span> = <span class="var-default">false</span>])
									</div>
								
				<div class="method-definition">
											<span class="method-result">String</span>
										<a href="#getOS" title="details" class="method-name">getOS</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">Readable</span>
										<a href="#getTimeStamp" title="details" class="method-name">getTimeStamp</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#getTmpDir" title="details" class="method-name">getTmpDir</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">True</span>
										<a href="#makeDirRecursive" title="details" class="method-name">makeDirRecursive</a>
											(<span class="var-type">$dir</span>&nbsp;<span class="var-name">$dir</span>, [<span class="var-type">$mode=0755</span>&nbsp;<span class="var-name">$mode</span> = <span class="var-default">0755</span>])
									</div>
								
				<div class="method-definition">
											<span class="method-result">String</span>
										<a href="#replaceBackslashes" title="details" class="method-name">replaceBackslashes</a>
											(<span class="var-type">$path</span>&nbsp;<span class="var-name">$path</span>)
									</div>
								
				<div class="method-definition">
											<span class="method-result">Shortened</span>
										<a href="#shortenFilename" title="details" class="method-name">shortenFilename</a>
											(<span class="var-type">$filename</span>&nbsp;<span class="var-name">$filename</span>, [<span class="var-type">$maxlength=150</span>&nbsp;<span class="var-name">$maxlength</span> = <span class="var-default">80</span>])
									</div>
								
				<div class="method-definition">
											<span class="method-result">String</span>
										<a href="#unixifyPath" title="details" class="method-name">unixifyPath</a>
											(<span class="var-type">$path</span>&nbsp;<span class="var-name">$path</span>)
									</div>
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#writeError" title="details" class="method-name">writeError</a>
											(<span class="var-type">$str</span>&nbsp;<span class="var-name">$str</span>)
									</div>
							</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="var$logger" id="$logger"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$logger</span>
						(line <span class="line-number">30</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">static:</span> </li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																	<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methodcapitalizeDriveLetter" id="capitalizeDriveLetter"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">capitalizeDriveLetter</span> (line <span class="line-number">138</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Convert the drive letter to upper case</p>
	<ul class="tags">
				<li><span class="field">return:</span> Path with driver letter capitalized.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">String</span>
		<span class="method-name">
			capitalizeDriveLetter
		</span>
					(<span class="var-type">$path</span>&nbsp;<span class="var-name">$path</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">$path</span>
				<span class="var-name">$path</span><span class="var-description">: Windows path with &quot;c:&lt;blah&gt;&quot;</span>			</li>
				</ul>
		
		
	</div>
<a name="methodgetLogger" id="getLogger"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getLogger</span> (line <span class="line-number">211</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			getLogger
		</span>
					([<span class="var-type">mixed</span>&nbsp;<span class="var-name">$package</span> = <span class="var-default">false</span>])
			</div>
	
		
		
	</div>
<a name="methodgetOS" id="getOS"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getOS</span> (line <span class="line-number">191</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the current OS code  WIN - Windows, LIN -Linux, etc.</p>
	<ul class="tags">
				<li><span class="field">return:</span> 3 letter code for current OS</li>
				<li><span class="field">access:</span> public</li>
				<li><span class="field">since:</span> 0.6.6</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">String</span>
		<span class="method-name">
			getOS
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodgetTimeStamp" id="getTimeStamp"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getTimeStamp</span> (line <span class="line-number">41</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return the current timestamp in human readable format.</p>
<p class="description"><p>Thursday March 17, 2005 19:10:47</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> timestamp</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">Readable</span>
		<span class="method-name">
			getTimeStamp
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodgetTmpDir" id="getTmpDir"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getTmpDir</span> (line <span class="line-number">197</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			getTmpDir
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodmakeDirRecursive" id="makeDirRecursive"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">makeDirRecursive</span> (line <span class="line-number">156</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Make directory recursively.</p>
<p class="description"><p>(Taken from: http://aidan.dotgeek.org/lib/?file=function.mkdirr.php)</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> on success, False on failure</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">True</span>
		<span class="method-name">
			makeDirRecursive
		</span>
					(<span class="var-type">$dir</span>&nbsp;<span class="var-name">$dir</span>, [<span class="var-type">$mode=0755</span>&nbsp;<span class="var-name">$mode</span> = <span class="var-default">0755</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">$dir</span>
				<span class="var-name">$dir</span><span class="var-description">: Directory path to create</span>			</li>
					<li>
				<span class="var-type">$mode=0755</span>
				<span class="var-name">$mode</span>			</li>
				</ul>
		
		
	</div>
<a name="methodreplaceBackslashes" id="replaceBackslashes"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">replaceBackslashes</span> (line <span class="line-number">124</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Convert the back slash path separators with forward slashes.</p>
	<ul class="tags">
				<li><span class="field">return:</span> Path with back slashes replaced with forward slashes.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">String</span>
		<span class="method-name">
			replaceBackslashes
		</span>
					(<span class="var-type">$path</span>&nbsp;<span class="var-name">$path</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">$path</span>
				<span class="var-name">$path</span><span class="var-description">: Windows path with backslash path separators</span>			</li>
				</ul>
		
		
	</div>
<a name="methodshortenFilename" id="shortenFilename"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">shortenFilename</span> (line <span class="line-number">59</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Shorten the filename to some maximum characters</p>
	<ul class="tags">
				<li><span class="field">return:</span> file path</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">Shortened</span>
		<span class="method-name">
			shortenFilename
		</span>
					(<span class="var-type">$filename</span>&nbsp;<span class="var-name">$filename</span>, [<span class="var-type">$maxlength=150</span>&nbsp;<span class="var-name">$maxlength</span> = <span class="var-default">80</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">$filename</span>
				<span class="var-name">$filename</span><span class="var-description">: Complete file path</span>			</li>
					<li>
				<span class="var-type">$maxlength=150</span>
				<span class="var-name">$maxlength</span><span class="var-description">: Maximum allowable length of the shortened  filepath</span>			</li>
				</ul>
		
		
	</div>
<a name="methodunixifyPath" id="unixifyPath"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">unixifyPath</span> (line <span class="line-number">105</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Convert Windows paths to Unix paths</p>
	<ul class="tags">
				<li><span class="field">return:</span> Unixified file path</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">String</span>
		<span class="method-name">
			unixifyPath
		</span>
					(<span class="var-type">$path</span>&nbsp;<span class="var-name">$path</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">$path</span>
				<span class="var-name">$path</span><span class="var-description">: File path</span>			</li>
				</ul>
		
		
	</div>
<a name="methodwriteError" id="writeError"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">writeError</span> (line <span class="line-number">90</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Write error log if debug is on</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			writeError
		</span>
					(<span class="var-type">$str</span>&nbsp;<span class="var-name">$str</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">$str</span>
				<span class="var-name">$str</span><span class="var-description">: Error string</span>			</li>
				</ul>
		
		
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Fri, 06 Jul 2007 12:51:40 -0700 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a>
	</p>
	</div></body>
</html>